﻿<UserControl x:Class="Kiosk.UserControls.EmployeePresenter"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:uc="clr-namespace:Kiosk.UserControls"
    Height="384" Width="672" DataContextChanged="UserControl_DataContextChanged">
    <Border BorderBrush="Black" BorderThickness="2" >
        <Border.Background>
            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                <GradientStop Color="#FFFFFF"  Offset=".25"/>
                <GradientStop Color="LightGray" Offset="1"/>
            </LinearGradientBrush>
        </Border.Background>
        <Grid>
            <Grid.RowDefinitions>

                <RowDefinition Height="150*" />
                <RowDefinition Height="272*" />
                <RowDefinition Height="52.177*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="215*" />
                <ColumnDefinition Width="379*" />
                
            </Grid.ColumnDefinitions>
            <Viewbox  Stretch="Uniform" StretchDirection="Both" Grid.Row="0" Grid.ColumnSpan="2">
                    <TextBlock Name="txtName" Foreground="Black" FontFamily="Calibri" HorizontalAlignment="Left"  Text="{Binding FullName}" Margin="10,0,10,0">
                    </TextBlock>
            </Viewbox>
            <Grid Grid.Row="1" >
                <Grid.RowDefinitions>
                    <RowDefinition Height="180.895*" />
                    <RowDefinition Height="75*" />
                    <RowDefinition Height="75*" />
                </Grid.RowDefinitions>
                <Viewbox Grid.Row="0" Stretch="Uniform" StretchDirection="Both" >
                <Rectangle  RadiusX="15" RadiusY="15" 
                           Width="{Binding ElementName=personBrush,Path=ImageSource.Width}" 
                           Height="{Binding ElementName=personBrush,Path=ImageSource.Height}">
                            <Rectangle.Fill>
                        <ImageBrush Stretch="None" x:Name="personBrush" ImageSource="images/noperson.jpg"/>
                    </Rectangle.Fill>
                </Rectangle>
                </Viewbox>
                <Viewbox Grid.Row="1">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Foreground="DarkGray" Margin="15,0,0,0" FontWeight="Bold" Text="Office Phone:"></TextBlock>
                        <TextBlock Foreground="Black" Margin="15,0,0,0" Text="{Binding OfficePhone}"></TextBlock>
                    </StackPanel>                           
                </Viewbox>
                <Viewbox Grid.Row="2" >
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Foreground="DarkGray" Margin="15,0,0,0" FontWeight="Bold" Text="Email:"></TextBlock>
                        <TextBlock Foreground="Black" Margin="15,0,0,0" Text="{Binding Email}"></TextBlock>
                    </StackPanel>
                </Viewbox>

            </Grid>
            <Image Margin="3" Source="images/Magenic.png" Grid.Column="0" Grid.Row="2" Stretch="Uniform" />
            <uc:MapPresenter Grid.Row="1" Grid.Column="1"  StartPoint="163,322" EndPoint="100,200" EndLocationName="End up here"  Height="Auto" Width="Auto" x:Name="map" >
            </uc:MapPresenter>

            <uc:ucImageButton MouseUp="ucImageButton_MouseUp"  HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="2" Grid.Column="1" Height="Auto" Width="Auto" ButtonImage="images/closeBTN.png" ButtonGlow="images/closeGlowBTN.png" />
        </Grid>
        
    </Border>
</UserControl>
